package com.smarthome.core.historyAccount.impl;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.springframework.stereotype.Service;

import com.smarthome.base.service.ShHistoryAccountService;
import com.smarthome.core.historyAccount.HistoryAccountService;
import com.smarthome.domain.bean.ShHistoryAccount;


@Service("historyAccountService")
public class HistoryAccountServiceImpl implements HistoryAccountService {
	
	protected static Logger LOGGER;

    @Resource
    private ShHistoryAccountService shHistoryAccountService;

    /**
     * 得到list
     */
    @Override
    public List<ShHistoryAccount> queryShHistoryAccountList(ShHistoryAccount shHistoryAccount){
        return shHistoryAccountService.selectEntryList(shHistoryAccount);
    }
    
    /**
     * 新增操作
     */
    @Override
    public void add(ShHistoryAccount shHistoryAccount) {
    	shHistoryAccountService.insert(shHistoryAccount);
    }
    
    /**
	  * 更新
	  * @param shHistoryAccount
	  */
    @Override
    public void update(ShHistoryAccount shHistoryAccount){
    	shHistoryAccountService.saveOrUpdate(shHistoryAccount);
    }
	 
    
    /**
     * 通过id得到对象
     */
    @Override
    public  ShHistoryAccount queryShHistoryAccountById(Long id) {
        return shHistoryAccountService.selectEntryById(id);
    }
    
}
